import http from "@/utils/http";

export default {
    getListAll: ():Promise<Vm.Order[]> => http<null,Vm.Order[]>({ url: 'order/list_all' }),
    getListPay: ():Promise<Vm.Order[]> => http<null,Vm.Order[]>({ url: 'order/list_pay' }),
    getListUnpay: ():Promise<Vm.Order[]> => http<null,Vm.Order[]>({ url: 'order/list_unpay' }),
    //确认订单
    // <HttpPayload.Submit,>
    confirmOrder: (data: HttpPayload.Submit): Promise<string> => http<HttpPayload.Submit, string>({ url: 'order/confirm', method: 'post', data }),
    //为指定的订单付款
    pay: (id: string):Promise<null> => http<string,null>({ url: 'order/pay/' + id }),
    // 获取商品
    getOrder: (id: string):Promise<number> => http<string, number>({ url: 'order/account/' + id }),
    remove:(id:string):Promise<null>=>http<string,null>({url:'order/remove/'+id})

}